package com.example.demo;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

//import javax.activation.DataSource;

import javax.sql.DataSource;

@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    /**
     * make sure dataSource can autowired.
     * @param dataSource
     * @return
     */
    @Bean
    public CommandLineRunner demo(DataSource dataSource) {
        return args -> {

        };
    }
}
